export default [
  // user
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', name: 'login', component: './User/Login' },
      { path: '/user/register', name: 'register', component: './User/Register' },
      {
        path: '/user/register-result',
        name: 'register.result',
        component: './User/RegisterResult',
      },
    ],
  },
  // app
  {
    path: '/admin',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    routes: [
      // dashboard
      { path: '/', redirect: '/admin/home' },
      {
        path: '/admin/home',
        name: 'home',
        icon: 'dashboard',
        component: './Admin/Home',
      },
      {
        path: '/admin/system',
        name: 'system',
        icon: 'setting',
        routes: [
          {
            path: '/admin/system/menu',
            name: 'menu',
            component: './Admin/System/Menu',
          }, 
          {
            path: '/admin/system/menu/dialog',
            name: 'menuDialog',
            hideInMenu: true,
            component: './Admin/System/MenuDialog',
          }, 
          {
            path: '/admin/system/sys',
            name: 'sys',
            component: './Admin/System/Sys',
          }, 
          {
            path: '/admin/system/sys/dialog',
            name: 'sysDialog',
            hideInMenu: true,
            component: './Admin/System/SysDialog',
          }
        ]
      },
      {
        component: '404',
      },
    ],
  },
];
